import { defHttp } from '/@/utils/http/axios';
import { editDomainmodel, getDomainmodel } from '/@/api/model/getDomainmodel';

enum Api {
  SaveOrUpdateDomain = '/ccbJinke/saveOrUpdateDomain',
  GetAllDomain = '/ccbJinke/getAllDomain',
  DeleTeDomain = '/ccbJinke/deleTeDomain',
  GetDomain = '/ccbJinke/getDomain',
}

/**
 * @description: Get user menu based on id
 */
export const getDomain = (params: getDomainmodel) => {
  return defHttp.get({ url: Api.GetDomain, params });
};
export const deleTeDomain = (params: Recordable) => {
  return defHttp.get({ url: Api.DeleTeDomain, params });
};
export const getAllDomain = () => {
  return defHttp.get({ url: Api.GetAllDomain });
};
export const saveOrUpdateDomain = (params: editDomainmodel) => {
  return defHttp.post({ url: Api.SaveOrUpdateDomain, params });
};
